package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HealthRecordsMapper;
import com.ruoyi.system.domain.HealthRecords;
import com.ruoyi.system.service.IHealthRecordsService;
import com.ruoyi.common.core.text.Convert;

/**
 * 健康档案Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-05-04
 */
@Service
public class HealthRecordsServiceImpl implements IHealthRecordsService 
{
    @Autowired
    private HealthRecordsMapper healthRecordsMapper;

    /**
     * 查询健康档案
     * 
     * @param healthId 健康档案ID
     * @return 健康档案
     */
    @Override
    public HealthRecords selectHealthRecordsById(Long healthId)
    {
        return healthRecordsMapper.selectHealthRecordsById(healthId);
    }

    /**
     * 查询健康档案列表
     * 
     * @param healthRecords 健康档案
     * @return 健康档案
     */
    @Override
    public List<HealthRecords> selectHealthRecordsList(HealthRecords healthRecords)
    {
        return healthRecordsMapper.selectHealthRecordsList(healthRecords);
    }

    /**
     * 新增健康档案
     * 
     * @param healthRecords 健康档案
     * @return 结果
     */
    @Override
    public int insertHealthRecords(HealthRecords healthRecords)
    {
        return healthRecordsMapper.insertHealthRecords(healthRecords);
    }

    /**
     * 修改健康档案
     * 
     * @param healthRecords 健康档案
     * @return 结果
     */
    @Override
    public int updateHealthRecords(HealthRecords healthRecords)
    {
        return healthRecordsMapper.updateHealthRecords(healthRecords);
    }

    /**
     * 删除健康档案对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteHealthRecordsByIds(String ids)
    {
        return healthRecordsMapper.deleteHealthRecordsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除健康档案信息
     * 
     * @param healthId 健康档案ID
     * @return 结果
     */
    @Override
    public int deleteHealthRecordsById(Long healthId)
    {
        return healthRecordsMapper.deleteHealthRecordsById(healthId);
    }
}
